package com.lzs.adx.web.modules.adx.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lzs.adx.commmon.service.impl.CrudServiceImpl;
import com.lzs.adx.web.modules.adx.dao.MonitorTemplateDao;
import com.lzs.adx.web.modules.adx.dto.MonitorTemplateDTO;
import com.lzs.adx.web.modules.adx.entity.MonitorTemplateEntity;
import com.lzs.adx.web.modules.adx.service.MonitorTemplateService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 监测地址模板
 *
 * @author wangzhijun 825400558@qq.com
 * @since 1.0.0 2023-11-29
 */
@Service
public class MonitorTemplateServiceImpl extends CrudServiceImpl<MonitorTemplateDao, MonitorTemplateEntity, MonitorTemplateDTO> implements MonitorTemplateService {

    @Override
    public QueryWrapper<MonitorTemplateEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<MonitorTemplateEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}